<?php
/*
 * ******************************************************
 * CALLED WHEN AN ITEM IS POSTED FOR JOBS CATEOGRY
 * ******************************************************
 */
require_once 'table.php';
$tbl=new Model_Table_JobsAttr();
$values=array();
$values['item_id']=$item->getItem_id ();
$values['agent_type']=Params::getParam('agent_type');
$values['condition']=Params::getParam('condition');
$values['manufacturer']=Params::getParam('manufacturer');
$values['body_type']=Params::getParam('body_type');
$values['fuel_type']=Params::getParam('fuel_type');
$values['year']=Params::getParam('year');
$values['transmission']=Params::getParam('transmission');
$values['engine_size']=Params::getParam('engine_size');
$values['colour']=Params::getParam('colour');
$values['mileage']=Params::getParam('mileage');
$values['registration_date']=Params::getParam('registration_date');
$values['model']=Params::getParam('model');
$values['model_year']=Params::getParam('model_year');
$tbl->insert($values);
unset($values['item_id']);
unset($values['year']);
$item->setTags(implode(',',$values));
$item->save();